package com.bdqn.controller;

import com.bdqn.dao.smbms_userdao;
import com.bdqn.entity.user;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
public class hello {

    @Autowired
    private smbms_userdao userdao;


    @RequestMapping("/hello")
    public String sevy(HttpServletRequest request){
        user u = userdao.getUser(6);
        request.getSession().setAttribute("user",u);
        return "index";
    }




}
